///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //UNINIVERSITy MANAGEMENT PROGRAM ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //Headers inclusion #include #include #include #include #include using namespace std; //Structure defining //For students struct student { string fname;//for student first name string lname;//for student last name string Registration;//for Registration No number string classes;//for class info }studentData;//Variable of student type //For teachers struct teacher { string fst_name;//first name of teacher string lst_name;//last name of teacher string qualification;//Qualification of teacher string exp;//Experiance of the person string pay;//Pay of the Teacher string subj;//subject whos he/she teach string lec;//Lecture per Week string addrs;//Adders of teacher home string cel_no;//Phone number string blod_grp;//Bool Group string serves;//Number of serves in university }tech[50];//Variable of teacher type /////////////////////////////////////////////////// //Main function int main() { int i=0,j;//for processing usage char choice;//for getting choice string find;//for sorting string srch; while(1)//outer loop { system("cls");//Clear screen //Level 1-Display process cout<<"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"; cout<<"\n\n\t\t\tUNIVERSITY MANAGEMENT PROGRAM\n\n"; cout<<"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"; cout<<"\n\n\t\t\tMAIN SCREEN\n\n"; cout<<"Enter your choice: "<>choice; system("cls");//Clear screen switch(choice)//First switch { case '1': //Student { while(1)//inner loop-1 { system("cls");//Clear screen //Level-2 display cout<<"\t\t\tSTUDENTS INFORMATION AND BIO DATA SECTION\n\n\n"; cout<<"Enter your choice: "<>choice; switch (choice)//Second switch { case '1'://Insert data { ofstream f1("student.txt",ios::app); for( i=0;choice!='n';i++) { if((choice=='y')||(choice=='Y')||(choice=='1')) { cout<<"Enter First name: "; cin>>studentData.fname; cout<<"Enter Last name: "; cin>>studentData.lname; cout<<"Enter Registration number: "; cin>>studentData.Registration; cout<<"Enter class: "; cin>>studentData.classes; f1<>choice; } } f1.close(); } continue;//control back to inner loop -1 case '2'://Display data { ifstream f2("student.txt"); cout<<"Enter First name to be displayed: "; cin>>find; cout<>choice; switch (choice)//Third switch { case '1'://Insert data { ofstream t1("teacher.txt",ios::app); for(i=0;choice!='n'&& choice!='N';i++) { if((choice=='y')||(choice=='Y')||(choice=='1')) { cout<<"Enter First name: "; cin>>tech[i].fst_name; cout<<"Enter Last name:: "; cin>>tech[i].lst_name; cout<<"Enter qualification: "; cin>>tech[i].qualification; cout<<"Enter experiance(year): "; cin>>tech[i].exp; cout<<"Enter number of year in this university: "; cin>>tech[i].serves; cout<<"Enter Subject whos teach: "; cin>>tech[i].subj; cout<<"Enter Lecture(per Week): "; cin>>tech[i].lec; cout<<"Enter pay: "; cin>>tech[i].pay; cout<<"Enter Phone Number: "; cin>>tech[i].cel_no; cout<<"Enter Blood Group: "; cin>>tech[i].blod_grp; t1<>choice; }//if }//for loop //for finding through name system("cls"); t1.close(); }//case 1 continue;//Control pass to inner loop-2 case '2'://Display data { ifstream t2("teacher.txt"); cout<<"Enter name to be displayed: "; cin>>find; cout<